package com.generic.potential.type.applylist;

import java.util.ArrayList;
import java.util.List;

public class Test {

	public static void main(String[] args) throws Exception {
		List<Shape> shapes = new ArrayList<Shape>();
		for (int i = 0; i < 10; i++) {
			shapes.add(new Shape());
		}
		Apply.apply(shapes, Shape.class.getMethod("rotate"));
		Apply.apply(shapes, Shape.class.getMethod("resize", int.class), 5);

		System.out.println("==========================");

		List<Square> squares = new ArrayList<Square>();
		for (int i = 0; i < 10; i++) {
			squares.add(new Square());
		}
		Apply.apply(squares, Shape.class.getMethod("rotate"));
		Apply.apply(squares, Shape.class.getMethod("resize", int.class), 5);

		System.out.println("==========================");

		SimpleQueue<Shape> queues = new SimpleQueue<Shape>();
		for (int i = 0; i < 5; i++) {
			queues.add(new Shape());
			queues.add(new Square());
		}
		Apply.apply(queues, Shape.class.getMethod("rotate"));
		Apply.apply(queues, Shape.class.getMethod("resize", int.class), 5);

		System.out.println("==========================");

		FilledList<Shape> fills = new FilledList<Shape>(Shape.class, 10);
		Apply.apply(fills, Shape.class.getMethod("rotate"));
		Apply.apply(fills, Shape.class.getMethod("resize", int.class), 5);
	}

}
